package user;

import book.BookList;
import opera.IOperation;

public abstract class User {
    protected String name;//这里使用protected其实是封装特性，使其能在子类中访问

    public User(String name) {
        this.name = name;
    }
    public abstract int menu();//将User改为抽象类

    //这个点很难想,通过创建一个接口数组实现不同的对象，调用不同的操作
    protected IOperation[] iOperation;

    public void doWork(int choice, BookList bookList) {
        this.iOperation[choice].work(bookList);
    }
}
